/*
 * GlassPane2.java
 *
 * Created on April 20, 2007, 8:23 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.voidness.twittava.gui.glass;

import java.awt.event.KeyAdapter;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseMotionAdapter;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author void
 */
public class GlassPanel extends JPanel {
    
    /** Creates a new instance of GlassPanel */
    public GlassPanel() {
        // trap both mouse and key events.  Could provide a smarter key handler
        // if you wanted to allow things like a keystroke that would cancel the
        // long-running operation.
        addMouseListener(new MouseAdapter() {});
        addMouseMotionListener(new MouseMotionAdapter() {});
        addKeyListener(new KeyAdapter() {});
        
        // Get focus for the progress bar
        JLabel label = new JLabel();
        this.add(label);
        label.requestFocus();
        
        // make sure the focus won't leave the glass pane
        setFocusCycleRoot(true);
    }
    
}
